<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Jquery Full Browser Background Images - Slideshow</title>
<link href="css/demo.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.6.4.min.js" type="text/javascript" ></script>
<script src="js/jquery.refFullBgImg.js" type="text/javascript"></script>
<script type="text/javascript">
	//slideshow demo
	//counter
	var a = 0;
	//store some images in an array
	var homePageShowArray = ["images/comp.gif", "images/raglan.jpg", "images/glanio.jpg", "images/windsor.jpg"];
	
	//background image loading functions, loads first image on page load
	$(document).ready(function() {		
		//start gallery
		homePageShow();			  
	});
	
	//simple method for calling the npFullBgImg methods and loading in a new image.
	function homePageShow() {
		 //request an image, with a call back to start the gallery timer each time the image is loaded and displayed  
		 $('#imgContainer').refFullBgImg({fadeInSpeed: 2000, center: true, callback:function(){startGalleryTimer()}},homePageShowArray[a]);
		 //increment counter
		 a++;
		 //loop gallery here
		 if(a == homePageShowArray.length) a=0;
	}
	
	function startGalleryTimer() {
		//set up timer for gallery, set here to 10 seconds.
		setTimeout("homePageShow()", 10000);
	}

</script>

</head>

<body>
<div id="imgContainer"></div>
</body>
</html>
